# 08-for-in遍历
'''
    for 变量 in 需要的遍历的值:
'''
# 1、遍历一个list 
list = [1,2,3,4,5,6,7]
for a in list:
    print(a)

for a in 'abcdefg':
    print(a)
# 2、break 跳出循环语句
list1 = ['taobao','1688','pdd','jd','dy']
for fwejj in  list1:
    print(fwejj)
    if fwejj=='pdd':
        break
# 3、使用for in 输出 0-10 range()
for x in range(11):
    print(x)
# 4、 输出数值区间 输出：50-100
for x in  range(50,101):
    print(x)
# 5、输出50-100 步长为4
for x in range(50,101,4):
    print(x)
# 6、输出-10-100 步长为-40
for x in range(-10,-101,-40):
    print(x)
# 7、continue 跳过
for x in 'nanchang':
    if x=='c':
        continue # 跳过
    print(x)